# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=wmctrl
pkgver=1.07
pkgrel=0
pkgdesc="wmctrl is a UNIX/Linux command line tool to interact with an EWMH/NetWM compatible X Window Manager"
url="https://sites.google.com/site/tstyblo/wmctrl"
arch="all"
license="GPL"
depends=""
depends_dev=""
makedepends="libxmu-dev libx11-dev glib-dev"
install=""
subpackages="$pkgname-doc"
source="https://sites.google.com/site/tstyblo/wmctrl/wmctrl-1.07.tar.gz"

_builddir=${srcdir}/${pkgname}-${pkgver}
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
        ./configure \
           --prefix=/usr \
           --mandir=/usr/share/man || return 1
        make
}

package() {
	cd "$_builddir"
        make DESTDIR="$pkgdir" install || return 1
}

sha512sums="4c77ad1e204e8d444f682ad1d05c0993bcab9097ac6d4b6a944556ab85acbe713f549dbaf443cd4d1226a162ce7d46fbd209c92652e87fc8e609feee74907daa  wmctrl-1.07.tar.gz"
